/**
 * 2017-10-19 by ShiJun Liu
 *  菜单数据 和获取菜单方法

 */
export default {

    getMenu: function(arry) {
        var json = [];
        for (let k = 0; k < arry.length; k++) {
            for (let i = 0; i < this.menuList.length; i++) {
                for (let j = 0; j < this.menuList[i].content.length; j++) {
                    if (this.menuList[i].content[j].name == arry[k]) {
                        var ob = {
                            name: this.menuList[i].name,
                            content: [this.menuList[i].content[j]]
                        };
                        json.push(ob);
                    }
                }
            }
        }
        for (let i = 1; i < json.length; i++) {
            if (json[i].name == json[i - 1].name) {
                json[i - 1].content.push(json[i].content[0]);
                json.splice(i, 1);
                i--;
            }
        }
        return json;
    },

    menuList: [{
            name: '客户关系管理',
            content: [{
                    name: '沟通提醒',
                    url: 'CRMRemain'
                },
                {
                    name: '渠道管理',
                    url: 'CRMOrganization'
                },
                {
                    name: '客户管理',
                    url: 'CRMCustom'
                },
                {
                    name: '渠道、客户分配',
                    url: 'CRMAllocation'
                }
            ]
        },
        {
            name: '销售管理',
            content: [{
                    name: '未提交投保单',
                    url: 'unSubmint'
                }, {
                    name: '新增投保单',
                    url: 'Selladd'
                },
                {
                    name: '投保单审核',
                    url: 'SellCheck'
                },
                {
                    name: '投保信息修改',
                    url: 'Sellchange'
                },
                {
                    name: '投保单上传下载',
                    url: 'Selluploade'
                }, {
                    name: '缴费确认',
                    url: 'SellPay'
                },
                {
                    name: '到账确认',
                    url: 'SellFinance'
                },
                {
                    name: '保险单上传',
                    url: 'SellDocument'
                }
            ]
        },
        {
            name: '退保管理',
            content: [{
                    name: '退保申请',
                    url: 'BackAsk'
                },
                {
                    name: '退保审核',
                    url: 'BackCheck'
                },
                {
                    name: '退保修改',
                    url: 'BackChange'
                },
                {
                    name: '退保结果确认',
                    url: 'BackEnsure'
                }
            ]
        },
        {
            name: '财务管理',
            content: [{
                    name: '保险公司结算',
                    url: 'ClearingCompany'
                },
                {
                    name: '渠道结算',
                    url: 'ClearingOrganization'
                }
            ]
        }, {
            name: '报案管理',
            content: [{
                    name: '新增报案',
                    url: 'ReportAdd'
                },
                {
                    name: '报案审核',
                    url: 'ReportCheck'
                },
                {
                    name: '报案修改',
                    url: 'ReportChange'
                }
            ]
        }, {
            name: '理赔上传',
            content: [{
                    name: '理赔账单添加',
                    url: 'lipeiadd'
                },
                {
                    name: '理赔审核',
                    url: 'lipeicheck' //'BillCheck'
                },
                {
                    name: '医师审核',
                    url: 'yishicheck'
                }, {
                    name: '待办任务',
                    url: 'lipeitask' //'BillChange'
                }
            ]
        }, {
            name: '理赔计算',
            content: [{
                    name: '理赔计算',
                    url: 'jisuan' //'ClearingBill'
                },
                {
                    name: '计算结果',
                    url: 'jisuanResult' //'ClearingBill'
                },
                {
                    name: '折扣计算',
                    url: 'zhekoujisuan' //'ClearingDiscount'
                }, {
                    name: '折扣结果',
                    url: 'zhekouResult' //'ClearingDiscount'
                },
                {
                    name: '支付确认',
                    url: 'zhifuqueren' //'ClearingDiscount'
                },
                {
                    name: '已完成支付',
                    url: 'lipeiResult'
                }
            ]

        },
        {
            name: '系统管理',
            content: [{
                    name: '用户管理',
                    url: 'SystemUserManage',
                    disabled: true
                },
                {
                    name: '产品管理',
                    url: 'SystemProduce'
                }, {
                    name: '学校管理',
                    url: 'SystemSchool'
                }, {
                    name: '医疗资源管理',
                    url: 'SystemHospital'
                }
            ]
        }, {
            name: '销售理赔查询',
            content: [{
                name: '查询',
                url: 'search'
            }]
        }
    ]
}